#pragma once
#include <QListWidgetItem>
#include <QListWidget>
#include <QObject>
#include <QDateTime>
#include <QLabel>
#include <QPushButton>

class AccountListItem :public QObject, public QListWidgetItem
{
	Q_OBJECT
public:
	AccountListItem(QListWidget *view = nullptr, int type = 0);
	~AccountListItem();
	void SetItemInfo(QListWidget* parentListWidget, QString uid, QString dateTime, QString inout, QString user, QString num, QString type, QString subType, QString item, QString remark);

protected slots:
	void onEditButtonClick();
	void onDelButtonClick();

private:
	QString m_uid;
	QString m_dateTime;
	QLabel* m_dateTimeLabel = nullptr;
	QLabel* m_inoutLabel = nullptr;
	QLabel* m_userLabel = nullptr;
	QLabel* m_numLabel = nullptr;
	QLabel* m_typeLabel = nullptr;
	QLabel* m_subTypeLabel = nullptr;
	QLabel* m_itemLabel = nullptr;
	QLabel* m_remarkLabel = nullptr;
	QPushButton* m_editBtn = nullptr;
	QPushButton* m_delBtn = nullptr;
};
